gui: replace flat group ComboBox with tree view in PasskeyImportDialog#13337
Open
tredondo wants to merge 1 commit into
Open
gui: replace flat group ComboBox with tree view in PasskeyImportDialog#13337tredondo wants to merge 1 commit into
tredondo wants to merge 1 commit into
Conversation
The group selector in the passkey import dialog used a QComboBox populated with flat slash-separated paths (e.g. "Root/SaaS/AWS"). For databases with many groups this list is hard to navigate and is inconsistent with the rest of the UI, where group selection uses a QTreeView.
Replace the ComboBox with two QRadioButtons ("Default passkeys group" / "Select group:") and a QTreeView backed by a GroupModelNoRecycle proxy — the same pattern already used by DatabaseSettingsWidgetFdoSecrets. The recycle-bin group is hidden. When "Select group" is chosen and nothing is selected yet the root is auto-selected so there is always a valid destination. The dialog minimum height is raised to accommodate the tree view.
Relevant files: src/gui/passkeys/PasskeyImportDialog.ui, src/gui/passkeys/PasskeyImportDialog.h, src/gui/passkeys/PasskeyImportDialog.cpp
Member
|
I am excited to test this, thank you! |
Member
|
One small thing I noticed. If I have to databases open and I activate the Select group option, and then switch to another database, the Group selection is back at the Default passkey group. For me it would be logical that this option is remembered even if I decide to switch to another database. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi again, and apologies in advance because I have a couple of recent closed PRs (#13317, #13335) where I was wrong on the merits, and I want to be upfront about that history before asking you to spend time on this one. Please feel free to close this just as quickly if it's already been considered, or if I'm again missing something obvious.
This change aims to fix #13336. It replaces the
QComboBoxgroup selector inPasskeyImportDialogwith aQTreeViewbacked by a smallQSortFilterProxyModel(GroupModelNoRecycle) — the same pattern already used byDatabaseSettingsWidgetFdoSecretsfor "Expose entries under this group". For databases with many nested groups, the flat slash-separated list (Root,Root/SaaS,Root/SaaS/AWS, …) can be hard to scan, and I thought it might be worth offering that hierarchical affordance here too. That said, I realize the two contexts are not identical (Secret Service is a config one-shot; the passkey dialog is a live registration flow), and I may be wrong about whether the comparison really holds.Concretely:
PasskeyImportDialog.ui: theGrouprow'sQComboBoxis replaced with twoQRadioButtons ("Default passkeys group (Imported Passkeys)" and "Select group:") plus aQTreeViewthat is enabled only when the second radio is chosen. Dialog minimum height bumped from 300 to 420 to leave room for the tree.PasskeyImportDialog.{h,cpp}: nestedGroupModelNoRecycleproxy (verbatim pattern fromsrc/fdosecrets/widgets/DatabaseSettingsWidgetFdoSecrets.cpp); recycle bin is filtered out.changeGroup(int)becomesonGroupSelectionChanged()driven by the tree's selection model and the radio toggles. When "Select group" is first checked and nothing is selected, the root is auto-selected so the import button always has a valid destination.I want to be transparent that this patch was drafted by Claude (Opus 4.7), and I reviewed and tested the result myself. Given my recent track record I'd completely understand reluctance to merge AI-assisted UI changes from me, and I'm not asking for special consideration.
Screenshots
Please see 13336.
Testing strategy
Built locally on Linux (Qt5, commit base
703855bfor code-equivalence; tree-view rebased onto currentdevelopat7c7ca45) with-DKPXC_FEATURE_BROWSER=ON -DKPXC_FEATURE_FDOSECRETS=ON. Verified manually:updateEntriesflow is preserved).DatabaseSettingsWidgetFdoSecretsbehaviour).QSignalBlockerto avoid a redundantaddEntries()).I did not add unit tests for the new path. If this direction is acceptable I'm willing to add one to
tests/; I held off because I wasn't sure the change would be wanted at all.Type of change
Thanks for taking a look, and sorry again for the noise on the previous two.